﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Models;
using System.Data;
using System.Data.SqlClient;
using DBUnitility;
namespace DAL
{
    public class AGVTypeService
    {
        /// <summary>
        /// 获取AGV类型访问类
        /// </summary>
        /// <returns></returns>
        public List<AGVType> GetAllAGVType()
        {
            string sql = "select TypeID,TypeName from AGVType";
            List<AGVType> list = new List<AGVType>();
            SqlDataReader objReader = SQLHelper.GetReader(sql);
            while (objReader.Read())
            {
                list.Add(new AGVType() { TypeID = Convert.ToInt32(objReader["TypeID"]), TypeName = objReader["TypeName"].ToString() });
            }
            objReader.Close();
            return list;
        }
    }
}
